package com.ruoyi.slope.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.inspection.mapper.SlopeInspectionDrainageMapper;
import com.ruoyi.slope.inspection.domain.SlopeInspectionDrainage;
import com.ruoyi.slope.inspection.service.ISlopeInspectionDrainageService;

/**
 * 边坡排水情况巡检Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeInspectionDrainageServiceImpl implements ISlopeInspectionDrainageService 
{
    @Autowired
    private SlopeInspectionDrainageMapper slopeInspectionDrainageMapper;

    /**
     * 查询边坡排水情况巡检
     * 
     * @param id 边坡排水情况巡检主键
     * @return 边坡排水情况巡检
     */
    @Override
    public SlopeInspectionDrainage selectSlopeInspectionDrainageById(Long id)
    {
        return slopeInspectionDrainageMapper.selectSlopeInspectionDrainageById(id);
    }

    /**
     * 查询边坡排水情况巡检列表
     * 
     * @param slopeInspectionDrainage 边坡排水情况巡检
     * @return 边坡排水情况巡检
     */
    @Override
    public List<SlopeInspectionDrainage> selectSlopeInspectionDrainageList(SlopeInspectionDrainage slopeInspectionDrainage)
    {
        return slopeInspectionDrainageMapper.selectSlopeInspectionDrainageList(slopeInspectionDrainage);
    }

    /**
     * 新增边坡排水情况巡检
     * 
     * @param slopeInspectionDrainage 边坡排水情况巡检
     * @return 结果
     */
    @Override
    public int insertSlopeInspectionDrainage(SlopeInspectionDrainage slopeInspectionDrainage)
    {
        slopeInspectionDrainage.setCreateTime(DateUtils.getNowDate());
        return slopeInspectionDrainageMapper.insertSlopeInspectionDrainage(slopeInspectionDrainage);
    }

    /**
     * 修改边坡排水情况巡检
     * 
     * @param slopeInspectionDrainage 边坡排水情况巡检
     * @return 结果
     */
    @Override
    public int updateSlopeInspectionDrainage(SlopeInspectionDrainage slopeInspectionDrainage)
    {
        slopeInspectionDrainage.setUpdateTime(DateUtils.getNowDate());
        return slopeInspectionDrainageMapper.updateSlopeInspectionDrainage(slopeInspectionDrainage);
    }

    /**
     * 批量删除边坡排水情况巡检
     * 
     * @param ids 需要删除的边坡排水情况巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionDrainageByIds(Long[] ids)
    {
        return slopeInspectionDrainageMapper.deleteSlopeInspectionDrainageByIds(ids);
    }

    /**
     * 删除边坡排水情况巡检信息
     * 
     * @param id 边坡排水情况巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionDrainageById(Long id)
    {
        return slopeInspectionDrainageMapper.deleteSlopeInspectionDrainageById(id);
    }
}
